﻿<Window x:Class="CalendarSubscriptionApp.SelectCasServerDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Select Exchange server to connect to" Height="288" Width="462">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Styles.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="24"  />
            <ColumnDefinition Width="Auto"  />
            <ColumnDefinition Width="*"  />
            <ColumnDefinition Width="8"  />
        </Grid.ColumnDefinitions>
        <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3">
            <Image Source="Images/exchange.png" Height="48" Width="48"/>
            <Label Content="Exchange Server" VerticalAlignment="Center" />
        </StackPanel>
        <TextBlock Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3" Text="A CAS server for the selected email address could not be discovered automatically. Please enter the hostname of the server the mailbox can be accessed through." TextWrapping="Wrap" />
        <TextBlock Grid.Row="2" Grid.Column="1" Text="Hostname:" />
        <TextBox Grid.Row="2" Grid.Column="2" Text="{Binding Hostname}" />
        <DockPanel Grid.Row="4" Grid.ColumnSpan="3" >
            <Button Style="{StaticResource CommandButton}" DockPanel.Dock="Right" Content="Cancel and close" Click="CancelButtonClick" />
            <Button Style="{StaticResource CommandButton}" DockPanel.Dock="Right" Content="Save and close" Click="SaveButtonClick" />
            <TextBlock />
        </DockPanel>
    </Grid>
</Window>
